package com.sea.product.service.impl;


import com.sea.product.entity.Channel;
import com.sea.product.mapper.ChannelMapper;
import com.sea.product.service.ChannelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

/**
 * @author 陈鸿飞
 */
@Service
public class ChannelServiceImpl implements ChannelService {

    @Autowired
    private ChannelMapper channelMapper;

    @Override
    public List<Channel> findByCnd(Channel channel) {
        return channelMapper.findByCnd(channel);
    }

    @Override
    public int save(Channel channel) {
        return channelMapper.insert(channel);
    }

    @Override
    public int delete(Integer id) {
        return channelMapper.delete(id);
    }

    @Override
    public Channel findByChannelName(String channelName) {
        return channelMapper.findByChannelName(channelName);
    }
}
